#ifndef ILAPP_BASE_H_
#define ILAPP_BASE_H_

/*
	Copyright (C) 2011 Salil Bhagurkar

	This file is part of illusion

	illusion is free software: you can redistribute it and/or modify
	it under the terms of the GNU Lesser General Public License as
	published by the Free Software Foundation, either version 3 of
	the License, or (at your option) any later version.

	illusion is distributed in the hope that it will be useful,
	but WITHOUT ANY WARRANTY; without even the implied warranty of
	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
	GNU Lesser General Public License for more details.

	You should have received a copy of the GNU Lesser General Public
	License along with illusion. 
	If not, see <http://www.gnu.org/licenses/>.
*/

#include <kernel/ilapp.h>

/*
 * To be included by the main file of an application
 */

extern void code(), data(), bss(), end(), _ilapp_load();

struct ilapp ilapp __attribute__((section(".text"))) = {
		.sign = ILAPP_SIGN,
		.header = &ilapp,
		.load = code,
		.entry = _ilapp_load,
		.data = data,
		.bss = bss,
		.end = end,
};

/*
 * Assembly procedures
 */
extern int _get_interface(char *name, void **interface);

#define GETI(name, var) _get_interface(name, (void **)var)


#endif /* ILAPP_BASE_H_ */
